package edu.xlh.travel.controller.user;

import edu.xlh.travel.common.Result;
import edu.xlh.travel.service.CheckingTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
@CrossOrigin
@RequestMapping("/foreCheckingTask")
public class ForeCheckingTaskController {
    @Autowired
    private CheckingTaskService checkingTaskService;

    @RequestMapping("/drawback")
    @ResponseBody
    public Result drawback(String orderId , String orderType ,  HttpSession session) {
        return checkingTaskService.drawback(orderId , orderType , session);
    }

    /*
     * 酒店退房
     * */
    @RequestMapping("/checkOut" )
    @ResponseBody
    public Result checkOut(String orderId , HttpSession session) {
        return checkingTaskService.checkOut(orderId , session);
    }
}
